Developer Documentation

QuickTime 4 API Documentation

QuickTime 4 Reference

Previous | Chapter Top | Chapter Contents | Next |

Note Allocator Functions: Miscellaneous Interface Tools

The functions in this section provide a user interface for instrument selection and presenting copyright information.

NAPickInstrument

The NAPickInstrument function presents a user interface for picking an instrument.

pascal ComponentResult NAPickInstrument(
                     NoteAllocator na,
                     ModalFilterUPP filterProc,
                     StringPtr prompt,
                     ToneDescription *sd,
                     unsigned long flags,
                     long refCon,
                     long reserved1,
                     long reserved2)
na
You obtain the note allocator identifier from the Component Manager's OpenComponent function. See the chapter "Component Manager" in Inside Macintosh: More Macintosh Toolbox for details.
filterProc
Standard modal filter UPP*.
prompt
Dialog box prompt "New Instrument".
*sd
On entry, the tone description of the instrument that appears in the picker dialog. On exit, a tone description of the instrument the user selected.
flags
Determines whether to display the picker dialog and what instruments appear for selection. See "Pick Instrument Flags" .
refcon
Contains a reference constant value. The Movie Toolbox passes this reference constant to your error-notification function each time it calls your function.
reserved1
Must contain zero.
reserved2
Must contain zero.
function result
A result code or -1 if there is a problem opening the dialog box.

DISCUSSION

The flags values limit which instruments appear within the dialog box. If the kPickDontMix flag is set, the dialog does not display a mix of synthesizer part types. For example, if the current instrument is a drum, only available drums appear in the dialog. The kPickSameSynth flag allows selections only within the current synthesizer. The kPickUserInsts flag allows user modifiable instruments to appear.

SEE ALSO

NAPickEditInstrument function

NAPickEditInstrument

The NAPickEditInstrument function presents a user interface for changing the instrument in a live note channel or modifying an atomic instrument.

extern pascal ComponentResult NAPickEditInstrument(
                     NoteAllocator na,
                     ModalFilterUPP filterProc,
                     StringPtr prompt,
                     long refCon,
                     NoteChannel nc,
                     AtomicInstrument ai,
                     long flags)
na
You obtain the note allocator identifier from the Component Manager's OpenComponent function. See the chapter "Component Manager" in Inside Macintosh: More Macintosh Toolbox for details.
filterProc
Standard modal filter UPP*.
prompt
Dialog box prompt "New Instrument".
refCon
Contains a reference constant value. The Movie Toolbox passes this reference constant to your error-notification function each time it calls your function.
nc
The live note channel that appears in the dialog. If you specify a note channel, set the ai parameter to 0. You obtain the note channel identifier from the NANewNoteChannel or the NANewNoteChannelFromAtomicInstrument function.
ai
The atomic instrument that appears in the dialog. If you specify an atomic instrument, set the nc parameter to 0. You obtain the atomic instrument from the InstrumentGetInst function.
flags
Flags limiting the instruments presented. See "Pick Instrument Flags"
function result
A result code or -1 if there is a problem opening the dialog.

DISCUSSION

The flags values limit which instruments appear within the dialog box. If the kPickDontMix flag is set, the dialog does not display a mix of synthesizer part types. For example, if the current instrument is a drum, only available drums appear in the dialog. The kPickSameSynth flag allows selections only within the current synthesizer. The kPickUserInsts flag allows user modifiable instruments to appear. If the kPickEditAllowPick flag is not set, no dialog appears.

SEE ALSO

NAPickInstrument function

NAStuffToneDescription

The NAStuffToneDescription function initializes a tone description structure with the details of a General MIDI note channel.

pascal ComponentResult NAStuffToneDescription(
                     NoteAllocator na,
                     long gmNumber,
                     ToneDescription *td)
na
You obtain the note allocator identifier from the Component Manager's OpenComponent function. See the chapter "Component Manager" in Inside Macintosh: More Macintosh Toolbox for details.
gmNumber
A General MIDI instrument number.
*td
On exit, an initialized tone description. The instrument name field will be filled in with the string name for the instrument.
function result
A result code.

NAPickArrangement

The NAPickArrangement function displays a dialog to allow instrument selection.

pascal ComponentResult NAPickArrangement(
                     NoteAllocator na,
                     ModalFilterUPP filterProc,
                     StringPtr prompt,
                     long zero1,
                     long zero2,
                     Track t,
                     StringPtr songName)
na
You obtain the note allocator identifier from the Component Manager's OpenComponent function. See the chapter "Component Manager" in Inside Macintosh: More Macintosh Toolbox for details.
filterProc
Standard modal filter upp*.
prompt
Dialog box prompt.
zero1
Must be 0.
zero2
Must be 0.
t
Arrangement movie track number.
songName
Name of song to display in dialog.
function result
A result code or -1 if there is a problem opening the dialog.

NACopyrightDialog

The NACopyrightDialog function displays a copyright dialog with information specific to a music device.

pascal ComponentResult NACopyrightDialog(
                     NoteAllocator na,
                     PicHandle p,
                     StringPtr author,
                     StringPtr copyright,
                     StringPtr other,
                     StringPtr title,
                     ModalFilterUPP filterProc,
                     long refCon)
na
You obtain the note allocator identifier from the Component Manager's OpenComponent function. See the chapter "Component Manager" in Inside Macintosh: More Macintosh Toolbox for details.
p
Picture image resource handle for dialog.
author
Author information.
copyright
Copyright information.
other
Any additional information.
title
Title information.
filterProc
Standard modal filter UPP*.
refcon
Contains a reference constant value. The Movie Toolbox passes this reference constant to your error-notification function each time it calls your function.
function result
A result code or -1 if there is a problem opening the dialog.

© 1999 Apple Computer, Inc.

Previous | Chapter Top | Chapter Contents | Next